import json
import logging as log

from locust import task
from com.maycur.gateway.common.base_entity import ApiTaskSet


class RoleTask(ApiTaskSet):

    @task
    def list_role(self):
        task_api = '/api/openapi/role/list'
        with self.client.get(task_api, headers=self.get_headers(), catch_response=True) as res:
            result_dto = self.parse_response(res)
            if result_dto is None:
                return
